package org.micode.demo.web.vo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.micode.common.validater.EnumValidation;
import org.micode.common.validater.InsertGroup;
import org.micode.common.validater.UpdateGroup;
import org.micode.demo.db.enums.DisableFlagEnum;

import javax.validation.constraints.NotNull;

/**
 * 修改禁用标识的VO对象
 */
@Data
@NoArgsConstructor
public class DisableUpdateVO<KT> {

    @NotNull(message = "{valid.key.not-null}")
    private KT id;

    /**
     * 禁用标识
     */
    @NotNull(message = "{valid.disableFlag.not-null}")
    @EnumValidation(clazz = DisableFlagEnum.class,
            method = "getValue", message = "Invalid value",
            groups = {InsertGroup.class, UpdateGroup.class})
    private Integer disableFlag;

}
